#ifndef _gnutlshelper_h
#define _gnutlshelper_h
extern "C"
{	
	typedef struct gnutls_session_int *gnutls_session_t;

	/**
	* initialize the support for session resume
	*
	* param size, max sessions can be resumed concurrently.
	* If there are more sessions than the size, the oldest session will be removed. The session db is a cycling array.
	*
	* Please call this before gnutls_global_init();
	**/
	__declspec( dllexport ) void init_session_resume(unsigned int size = 128);

	/**
	* Set session db for session
	*
	* Please call this in the end of each creation of new session
	**/
	__declspec( dllexport ) void set_session_db(gnutls_session_t session);

	/**
	* Set session db for session
	*
	* Please call this before gnutls_global_init();
	**/
	__declspec( dllexport ) void setup_libgcrypt_mutext_callback();

	/**
	* set gnutls_malloc, gnutls_free, gnutls_calloc and gnutls_secure_alloc
	*
	* You don't need to call this method explicitly, after dll loaded, it will be called automatically.
	* If you need to call it explicitly, please call it before gnutls_global_init().
	**/
	__declspec( dllexport ) void set_default_mem_ptr();

}
#endif